/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "hos_tipo_condicion")
@NamedQueries({
    @NamedQuery(name = "HosTipoCondicion.findAll", query = "SELECT h FROM HosTipoCondicion h")})
public class HosTipoCondicion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "htc_id")
    private Integer htcId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "htc_nombre")
    private String htcNombre;
    @Basic(optional = false)
    @NotNull
    @Column(name = "htc_estado")
    private int htcEstado;
    @OneToMany(mappedBy = "hosTipoCondicion", fetch = FetchType.LAZY)
    private List<HosCondicionPaciente> hosCondicionPacienteList;

    public HosTipoCondicion() {
    }

    public HosTipoCondicion(Integer htcId) {
        this.htcId = htcId;
    }

    public HosTipoCondicion(Integer htcId, String htcNombre, int htcEstado) {
        this.htcId = htcId;
        this.htcNombre = htcNombre;
        this.htcEstado = htcEstado;
    }

    public Integer getHtcId() {
        return htcId;
    }

    public void setHtcId(Integer htcId) {
        this.htcId = htcId;
    }

    public String getHtcNombre() {
        return htcNombre;
    }

    public void setHtcNombre(String htcNombre) {
        this.htcNombre = htcNombre;
    }

    public int getHtcEstado() {
        return htcEstado;
    }

    public void setHtcEstado(int htcEstado) {
        this.htcEstado = htcEstado;
    }

    public List<HosCondicionPaciente> getHosCondicionPacienteList() {
        return hosCondicionPacienteList;
    }

    public void setHosCondicionPacienteList(List<HosCondicionPaciente> hosCondicionPacienteList) {
        this.hosCondicionPacienteList = hosCondicionPacienteList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (htcId != null ? htcId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HosTipoCondicion)) {
            return false;
        }
        HosTipoCondicion other = (HosTipoCondicion) object;
        if ((this.htcId == null && other.htcId != null) || (this.htcId != null && !this.htcId.equals(other.htcId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.HosTipoCondicion[ htcId=" + htcId + " ]";
    }
    
}
